{{#component "main_supplier_top js-comp"}}
<script type="text/javascript" src="/assets/scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="assets/scripts/main_supplier/main_supplier_top.js"></script>
<script type="text/javascript" src="/assets/scripts/cookies.js"></script>
<script type="text/javascript">
    var vCode="";
    $(function(){
        var roleCode = '{{roleCode}}';
        var vName = "{{vName}}";
        if (vName==null){
          vName=getCookie('vName');
        }
        document.cookie="vName="+vName;
        var accountType = getCookie("accountType");
        if(accountType == '0'){
        var trueName = getCookie('trueName');
        vCode = getCookie('vCode');
        $(".userName").val("当前用户："+trueName+" "+vCode);
        }else if(accountType == '1'){
            if(roleCode == "S001"){
                vCode = '{{vCode}}';
                var trueName = "模块商";
                $(".userName").val("当前用户："+trueName+" "+vCode);
            }else{
                vCode = getCookie('vCode');
                trueName = getCookie('trueName');
                $(".userName").val("当前用户："+trueName+" "+vCode);
            }
        }


    });
    function userLogout() {
          $.get("logout", function () {
              //清除Cookie
              clearCookie('userName');
              clearCookie('vCode');
              clearCookie('roleCode');
              clearCookie('companyName');
              clearCookie('trueName');
              clearCookie('type');
              clearCookie('accountType');
              //clearCookie('showMSGflag');

          });
      }
 $(document).ready(function () {
     var roleCode = '{{roleCode}}';
     if(roleCode == '' || roleCode == null){
         var roleCode =getCookie('roleCode');
     }
     if(vCode==""){
         vCode = getCookie('vCode');
     }else{
     
     }
    
     var roleId =getCookie('roleId');
     var status = getCookie('status');
     var vName = getCookie('vName');
     console.log("vCode: "+vCode);
     document.getElementById("dp1").href="main_supplier?vcode="+ vCode;
     document.getElementById("dp2").href="userevaluation?vcode="+ vCode;
     // document.getElementById("backTop1").href="main_supplier?vCode=" + vCode +"&roleCode="+roleCode+ "&roleId=" + roleId + "&status=" + status;
     document.getElementById("backTop1").href="main_supplier?vCode=" + vCode +"&vName="+vName+ "&roleCode=" + roleCode ;

    });
</script>

<div class="main_supplier_main_top">
<div class="main_top">
  <div class="logo">
    <a id="backTop1"  style="height:118px;width:37px;"><img src="/assets/images/haier/haier.png" /></a>
  </div>
  <div class="hg_nav">
    <div class="navi">
      <ul class="hg_nav_list js_nav_list">
       <li id="hg_nav_li1"
       style="width: 105px; color: #005aaa; background: #fff; font-size: 15px;"><a
       href="#" style="color: #005aaa; font-weight: bold;" id="dp1"><img
       id="tp1"
       style="vertical-align: middle; height: 26px; width: 26px; margin-right: 2px; margin-top: -2px;"
       src="/assets/images/haier/main_supplier/stationb.png" />业务平台</a></li>
       <a
       href="#"
       id="dp2" target="_blank"><li id="hg_nav_li2"
       style="width: 105px; color: #fff; background: #005aaa; font-size: 15px;"><img id="tp2"
       style="vertical-align: middle; height: 26px; width: 26px; margin-right: 2px;margin-top: -2px;"
       src="/assets/images/haier/main_supplier/qualityw.png" />质量绩效</li></a>
     </ul>
   </div>
   <div class="hg_sch">
<!--     <input type="text" type="text" class="userName" readonly="readonly"
    id="userName"
    style="width: 263.5px; text-align: right; margin-right: 20px;"
    />
    <a href="logout" onclick="userLogout()" style="width: 50px;float: right;text-align: left">注销</a> -->
   <a id="backTop2_" style="width: 80px;margin-right: 0px;float: left;text-align: right;vertical-align:middle;"></a>
   <input type="text" class="userName" id="userName" value="" style="width:180px ;float: left;margin-right:0px; text-align: right;vertical-align:middle;padding: 0 0;margin-top: 1.8px;   " disabled />

      <a href="../../logout" onclick="userLogout()" style="width: 60px;float: right;text-align: left ;vertical-align:middle; ">注销</a>
  </div>
</div>
</div>
</div>
{{/component}}
